﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Frame.Lib.Core.User;
using Frame.Lib.Common;

namespace Jzy.Model.HR
{
    public partial class EmployeeInfo
    {
        public EmployeeInfo()
        {
            GetUserInfo = id => null;
        }

        private UserInfo _userInfo;
        public Func<int, UserInfo> GetUserInfo;
        public UserInfo UserInfo
        {
            get
            {
                if (_userInfo == null)
                {
                    _userInfo = GetUserInfo(this.ID);
                }
                return _userInfo;
            }
        }


        public string PhotoAbsPath
        {
            get
            {
                return GlobalVar.WebAppPath + this.Photo;
            }
        }
    }
}
